"""
基本面数据框研究
"""
import iplot.iplothelper as iplot
from iplot.bar import EventResearch,DaliyResearch
import matplotlib.pyplot as plt

def main():
    fig, ax = plt.subplots(figsize=(15, 9))
    e = EventResearch(fig, ax, 'USD', '非农就业人数 ', 3600, 86400*4)
    fig.canvas.mpl_connect('key_press_event', e.press)
    # print(e.high_val)
    plt.axhline(y=e.high_val)
    plt.axhline(y=e.low_val)
    plt.legend(['1','2'])
    plt.show()

def main2():
    fig, ax = plt.subplots(figsize=(15, 9))
    dr = DaliyResearch(fig, ax, '2016-05-04 00:00:00',86400*3, '8:30:00', '9:50:00')
    fig.canvas.mpl_connect('key_press_event', dr.press)
    plt.show()
if __name__ == '__main__':
    main()

